package vip.zhenzicheng.jvm.jvmbook.part2;

/**
 * 运行时常量池测试
 *
 * @author zhenzicheng
 * @date 2022-07-18 12:06
 */
public class RuntimeConstantPoolDemo {

  public static void main(String[] args) {
    String str1 = new StringBuilder("计算机").append("软件").toString();
    System.out.println(str1.intern() == str1);
    String str2 = new StringBuilder("ja").append("va").toString();
    System.out.println(str2.intern() == str2);
  }
}
